#include <iostream>
#include "DateTime.hpp"
using namespace std;
using util::DateTime;

void testSetters( DateTime &aStruct )
{
	//aStruct.set( 2010, 2, 27, 5, 25, 45 );
	
	aStruct.setYear( 2020 );
	aStruct.setMonth( 2 );
	aStruct.setDay( 27 );
	aStruct.setHour( 5 );
	aStruct.setMinute( 25 );
	aStruct.setSecond( 45 );
	
	cout << DateTime::now().getString() << endl;
	cout << aStruct.getYear() << endl;
	cout << aStruct.getMonth() << endl;
	cout << aStruct.getDay() << endl;
	cout << aStruct.getHour() << endl;
	cout << aStruct.getMinute() << endl;
	cout << aStruct.getSecond() << endl;
	aStruct.setFormatString( "%Y-%m-%d %H:%M:%S" );
	aStruct.getFormatString();
	cout << aStruct.getString();
	
}

void main()
{
	DateTime aStruct;
	
	try 
	{

		testSetters( aStruct );
		cout << "No Error occur" << endl;
	}
	catch (util::InvalidDateTimeValue &Error)
	{
		cout << Error.what() << endl;
	}	
}